<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<script src="../js/jquery-1.11.3.js"></script>
<style>
.orderList td {
	width: 200px;
	text-align: center;
}

.orderList .orderStatus {
	position: relative;
	right: -35px;
}

.orderList .orderdetailshow a {
	font-size: 12px;
	color: #A17567;
	position: relative;
	right: -20px;
	display: inline-block;
	width: 80px;
	color: #A17567;
}

.pageNumcontrol {
	position: relative;
	right: 30px;
	float: right;
}

.showdetail {
	display: inline-block;
	font-size: 12px;
	color: #A17567;
	position: relative;
	right: -10px;
}

.pageNumcontrol a {
	display: inline-block;
	color: #A17567;
}
</style>
<script>
	
</script>
</head>
<body>
	<div class="container">
		<div class="row">
			<nav class="navbar navbar-default">
				<div class="container-fluid">
					<!-- Brand and toggle get grouped for better mobile display -->
					<div class="navbar-header">
						<button type="button" class="navbar-toggle collapsed"
							data-toggle="collapse"
							data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
							<span class="sr-only">Toggle navigation</span> <span
								class="icon-bar"></span> <span class="icon-bar"></span> <span
								class="icon-bar"></span>
						</button>
						<a class="navbar-brand" href="#">21Cake</a>
					</div>
					<!-- Collect the nav links, forms, and other content for toggling -->
					<div class="collapse navbar-collapse"
						id="bs-example-navbar-collapse-1">
						<ul class="nav navbar-nav">
							<li class="active"><a href="#">首页 <span class="sr-only">(current)</span></a></li>
						</ul>
						<form action="orderlist.html" class="navbar-form navbar-left">
							<div class="form-group">
								<div class="form-group">
									<select class="form-control" id="categoryid" name="cid">
										<option value="0">--蛋糕分类--</option>
										<c:forEach var="c" items="${categories}">
											<c:if test="${cid==c.id}">
												<option value="${c.id}" selected="selected">${c.name}</option>
											</c:if>
											<c:if test="${cid!=c.id}">
												<option value="${c.id}">${c.name}</option>
											</c:if>
										</c:forEach>
									</select>
								</div>
								<label for="buyuser">买家：</label> <input type="text"
									class="form-control" id="buyuser" name="username"
									value="${username}" placeholder="- - 用户名查订单 - -"> <label
									for="orderoid">订单号：</label> <input type="text"
									class="form-control" id="orderoid" name="title"
									value="${title}" placeholder="- - 订单号 - -">
							</div>
							<button id="selectKey" class="btn btn-default">查询</button>
						</form>
						<ul class="nav navbar-nav navbar-right">
							<li><a href="adminLogin">注销</a></li>
							<li><a href="#">${LoginAdmin.userName}</a></li>
							<li class="dropdown"><a href="#" class="dropdown-toggle"
								data-toggle="dropdown" role="button" aria-haspopup="true"
								aria-expanded="false">用户中心<span class="caret"></span></a>
								<ul class="dropdown-menu">
									<li><a href="#">增加管理员</a></li>
									<li><a href="#">修改密码</a></li>
									<li><a href="#">修改用户名</a></li>
									<li role="separator" class="divider"></li>
									<li><a href="#">Separated link</a></li>
								</ul></li>
						</ul>
					</div>
				</div>
			</nav>
		</div>
		<div class="row">
			<div class="col-md-2">
				<ul class="list-group">
					<li class="list-group-item"><a href="orderlist.html">订单列表</a></li>
					<li class="list-group-item"><a href="userlist.jsp">用户列表</a></li>
					<li class="list-group-item"><a href="cakelist.html">商品列表</a></li>
					<li class="list-group-item"><a href="comm.html">评论列表</a></li>
				</ul>
			</div>
			<div class="col-md-10">
				<table class="table table-hover orderList">
					<thead>
						<td>编号</td>
						<td>订单号</td>
						<td>收货人</td>
						<td>订单状态</td>
					</thead>
					<tbody id="orderList">
						<c:forEach var="c" items="${cakeOrders}">
							<tr>
								<td>${c.id}</td>
								<td>${c.oid}</td>
								<td>${c.consignee}</td>
								<td>${c.status}<a href="orderdetail.html?orderid=${c.id}"
									class="showdetail">查看详情</a></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				<div class="pageNumcontrol">
					<span>第<span id="pageNumValue">${pageNum}</span>页,共<span
						id="totalPageValue">${totalpage}</span>页
					</span>
					<c:if test="${pageNum>1}">
						<a
							href="orderlist.html?pageNum=${pageNum-1}&cid=${cid}&title=${title}&username=${username}">上一页</a>
					</c:if>
					<c:if test="${pageNum<=1}">
						<a href="#">上一页</a>
					</c:if>
					<c:if test="${totalpage>pageNum}">
						<a
							href="orderlist.html?pageNum=${pageNum+1}&cid=${cid}&title=${title}&username=${username}">下一页</a>
					</c:if>
					<c:if test="${totalpage<=pageNum}">
						<a href="#">下一页</a>
					</c:if>
				</div>
			</div>
		</div>
	</div>
	<script src="../js/jquery-1.11.3.js"></script>
	<script src="../js/bootstrap.min.js"></script>
</body>
</html>
